package com.atguigu.yygh.statistic.controller;

import com.atguigu.yygh.common.result.R;
import com.atguigu.yygh.statistic.service.StatisticService;
import com.atguigu.yygh.vo.order.OrderCountQueryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * ClassName: StatisticController
 * Package: com.atguigu.yygh.statistic.controller
 * Description:
 *
 * @Author: cqk
 * @Create: 2023/10/8 - 14:20
 * @Version: v1.0
 */
@RestController
@RequestMapping("/admin/statistic")
public class StatisticController {
    @Autowired
    private StatisticService statisticService;


    @GetMapping("/countByDate")
    public R statistic(OrderCountQueryVo orderCountQueryVo){
        Map<String,Object> map = statisticService.statistic(orderCountQueryVo);
        return R.ok().data(map);
    }
}
